<?php if(!defined('HDPHP_PATH'))exit;C('SHOW_NOTICE',FALSE);?>
 <aside>
    <div class="avatar"><a href="about.html"><span>关于邦</span></a></div>
    <div class="topspaceinfo">
      <h1><?php echo $title;?></h1>
      <p>我的生活像 拍了一出戏 有超多导演跟编剧</p>
    </div>
    <div class="about_c">
      <p>网名：邦 </p>
      <p>职业：PHPer </p>
      <p>籍贯：江西省-赣州市</p>
      <p>电话：18650680200</p>
      <p>邮箱：375500819@qq.com</p>
    </div>
    
    <div class="tj_news">
      <h2>
        <p class="tj_t1">最新文章</p>
      </h2>
      <ul>
      	<?php
		$result = M('article')->field('htmldir,cname,is_archtml,aid,sendtime,click,title,thumb,digest,author,category_cid')->join('__article__ a JOIN __category__ c ON a.category_cid=c.cid')->where('is_recycle=0')->order('sendtime DESC')->limit(10)->all();
		foreach($result as $v):
			//组合图片图片
			$v['thumb']  = 'http://127.0.0.1/cms/cms/'.$v['thumb'];
			$v['commnum'] = K('Comment')->findCountComment($v['aid']);
			$category = K('Category')->findCate($v['category_cid']);
			$v['category_name'] = $category['cname'];
			//生成连接地址
			$v['url'] = getStaticPath($v['is_archtml'],$v['htmldir'],$v['aid']);
			
			 
?>	
	
        	<li><a href="<?php echo $v['url'];?>"><?php echo $v['title'];?></a></li>
        
<?php
	endforeach;
?>	
      </ul>
      <h2>
        <p class="tj_t2">推荐文章</p>
      </h2>
      <ul>
      	<?php
		$result = K('article')->findSpeExp('is_recycle=0 AND attr LIKE "%推荐%"','click DESC',8);
		foreach($result as $recom):
		$recom['thumb']  = 'http://127.0.0.1/cms/cms/'.$recom['thumb'];
		$recom['commnum'] = K('Comment')->findCountComment($recom['aid']);
		//生成连接地址
		$recom['url'] = getStaticPath($recom['is_archtml'],$recom['htmldir'],$recom['aid']);
?>
		
        <li><a href="<?php echo $recom['url'];?>"><?php echo $recom['title'];?></a></li>
        
<?php
	endforeach;
?>
      </ul>
    </div>
    <div class="links">
      <h2>
        <p>友情链接</p>
      </h2>
      <ul>
      	<?php
		$result = K('flink')->showAllFlink(1,10,'sort DESC');
		foreach($result as $flink):
		$flink['url'] = 'http://'.$flink['url'];
		$flink['logo']  = 'http://127.0.0.1/cms/cms/'.$flink['logo'];
		
?>
	
        <li><a href="<?php echo $flink['url'];?>"><?php echo $flink['fname'];?></a></li>
        
<?php
	endforeach;
?>	
      </ul>
    </div>
    <div class="copyright">
      <ul>
        <p> Design by <a href="/"><?php echo $title;?></a></p>
        <p></p>
        </p>
      </ul>
    </div>
  </aside>